import {createStore} from 'vuex'

export default createStore({
	state: {
	  curThemeType: uni.getStorageSync('theme') || 'light',
	},
	mutations: {
	  setCurThemeType(state, data) {
	    state.curThemeType = data;
		console.log(data, '-----')
	  }
	},
	actions: {
	  handleActionTheme({ commit }, boo) {
	    commit('setCurThemeType', boo);
	  },
	},
	getters: {
	  themeType(state) {
	    return state.curThemeType;
	  }
	},
	modules: {}
})